package com.easybuilder.core.function.dao;

import com.easybuilder.common.base.dao.BaseDao;
import com.easybuilder.core.function.entity.SysGrid;
import org.apache.ibatis.annotations.Delete;
import tk.mybatis.mapper.common.ExampleMapper;
import org.springframework.stereotype.Repository;


@Repository
public interface SysGridDao extends BaseDao<SysGrid>, ExampleMapper<SysGrid> {

    /** 根据tableId，级联删除table/tableInfo */
    @Delete("delete from sys_grid_item where grid_id in (select id from sys_grid where table_id = #{id})")
    int casecadeDeleteByTableId(Long id);
}